<%@ page language="java" contentType="text/html; charset=utf-8"
	pageEncoding="utf-8"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<style>
.pageleft {
	margin: 20px 0;
	padding-left: 100px;
	padding-top: 10px;
}

.pageright {
	text-align: right;
	padding-right: 150px;
}
</style>

<div class="container-fluid">
	<div class="row">
		<div class="col-md-6">
			<h4 class="pageleft" id="pageInf"></h4>
		</div>
		<c:set value="${1}" var="index" scope="session"></c:set>
			<c:set value="${fn:length(games)%5==0?fn:length(games)/5:fn:length(games)/5+1}" var="size" scope="session"></c:set>
		<div class="col-md-6 pageright" id="page">
			<%@ include file="../common/page.jsp" %>
		</div>
	</div>
</div>


<script type="text/javascript">
	function getPage(status) {
		if(status=="next"){
			${index=index+1};
			alert('${index}');
			$("#page").load(getContextPath()+"/page");
		}else if(status=="previous"){
			${index=index-1};
			alert('${index}');
			$("#page").load(getContextPath()+"/page");
		}
	}
</script>
